package com.ly.heart.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ly.common.core.domain.AjaxResult;
import com.ly.heart.domain.ActModelBusinessEntity;
import com.ly.leave.domain.WorkflowLeave;
import org.activiti.engine.task.Task;

/**
 * 流程与业务关联Service接口
 *
 * @author cxl
 * @date 2024-05-29
 */
public interface IActModelBusinessService extends IService<ActModelBusinessEntity> {
    /**
     * 查询流程与业务关联
     *
     * @param id 流程与业务关联ID
     * @return 流程与业务关联
     */
     ActModelBusinessEntity selectActModelBusinessEntityById(String id);

    /**
     * 查询流程与业务关联列表
     *
     * @param actModelBusinessEntity 流程与业务关联
     * @return 流程与业务关联集合
     */
     List<ActModelBusinessEntity> selectActModelBusinessEntityList(ActModelBusinessEntity actModelBusinessEntity);

    /**
     * 新增流程与业务关联
     *
     * @param actModelBusinessEntity 流程与业务关联
     * @return 结果
     */
     int insertActModelBusinessEntity(ActModelBusinessEntity actModelBusinessEntity);

    /**
     * 修改流程与业务关联
     *
     * @param actModelBusinessEntity 流程与业务关联
     * @return 结果
     */
     int updateActModelBusinessEntity(ActModelBusinessEntity actModelBusinessEntity);

    /**
     * 批量删除流程与业务关联
     *
     * @param ids 需要删除的流程与业务关联ID
     * @return 结果
     */
     int deleteActModelBusinessEntityByIds(String[] ids);

    /**
     * 删除流程与业务关联信息
     *
     * @param id 流程与业务关联ID
     * @return 结果
     */
     int deleteActModelBusinessEntityById(String id);

    /**
     * 根据流程实例id获取表单对象,给前端回显
     * @param instanceId
     * @return
     */
    String getBusinessDataByBusinessType(String instanceId);

    /**
     * 更改业务流程状态
     * @param currentTask
     */
    void updateBusinessState(Task currentTask);

    /**
     * 根据流程实例id获取任务审批状态
     * @param instanceId
     * @return
     */
    AjaxResult getTaskCommentByInstanceId(String instanceId);

    /**
     * 测试请假接口
     * @param workflowLeave
     * @return
     */
    int insertWorkflowLeave (WorkflowLeave workflowLeave);
}
